
#include <iostream>
using namespace std;


#if defined(__GNUC__) || defined(__MINGW32__) || defined(__MINGW__)
    #pragma GCC diagnostic push
    #pragma GCC diagnostic ignored "-Weffc++"
    #pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
    #pragma GCC diagnostic ignored "-Wold-style-cast"
    #pragma GCC diagnostic ignored "-Wsign-conversion"
#endif


#include <boost/variant.hpp>

#if defined(__GNUC__) || defined(__MINGW32__) || defined(__MINGW__)
    #pragma GCC diagnostic pop
#endif


#if defined(__GNUC__) || defined(__MINGW32__) || defined(__MINGW__)
    #pragma GCC diagnostic push
    #pragma GCC diagnostic ignored "-Weffc++"
#endif


#include <iostream>
using namespace std;


struct line {};

struct arc {};

struct intersects_algo : boost::static_visitor<bool> {

    virtual ~intersects_algo(){}

    bool operator()(const line&, const line&) const {
        cout << "line vs line\n"; return true;
    }

    bool operator()(const arc&, const arc&) const {
        cout << "arc vs arc\n"; return true;
    }

    bool operator()(const line&, const arc&) const {
        cout << "line vs arc\n"; return true;
    }
    bool operator()(const arc& a, const line& l) const {
        return this->operator()(l, a);
    }
};

using element = boost::variant<line, arc>;

bool intersects(const element& e1, const element& e2) {
    return boost::apply_visitor(intersects_algo(), e1, e2);
}


int main() 
{
       
    cout<<"WELLCOME TO EXAMPLE APPLICATION!\n";

    element e1 = line{};
    element e2 = arc{};

    bool result = intersects(e1, e2);
    (void)result;

    return 0;
}

#if defined(__GNUC__) || defined(__MINGW32__) || defined(__MINGW__)
    #pragma GCC diagnostic pop
#endif
